quartz: zoom/rotate change compile/runtime check from 10.7 to 10.8
authorFriedrich Beckmann <friedrich.beckmann@gmx.de>
Thu, 7 Apr 2016 07:33:41 +0000 (09:33 +0200)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 9 Apr 2016 22:05:59 +0000 (18:05 -0400)
The zoom/rotate change for quartz does not build on 10.7. This change
adds zoom/rotate support in quartz only for 10.8 and following. The
problems is described here:
https://bugzilla.gnome.org/show_bug.cgi?id=760276 and here
https://trac.macports.org/ticket/51052
NSEventPhaseMayBegin was only introduced in 10.8 although documentation
says it is introduced in 10.7. Tests on 10.7 indicate that the phase
property for the Magnify event is not supported at all on 10.7

gdk/quartz/gdkevents-quartz.c

index 749cc0211dd67d9b25f462385f856bf6f1478246..62094a8fc9490667c76e82c4c33989f44926c31e 100644 (file)
@@ -906,7 +906,7 @@ fill_crossing_event (GdkWindow       *toplevel,
    such that PINCH(STARTED), PINCH(UPDATE).... will not show a second
    PINCH(STARTED) event.
 */
-#ifdef AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER
+#ifdef AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER
 static void
 fill_pinch_event (GdkWindow *window,
                   GdkEvent  *event,
@@ -1002,7 +1002,7 @@ fill_pinch_event (GdkWindow *window,
     }
   event->touchpad_pinch.scale = last_scale;
 }
-#endif /* OSX Version >= 10.7 */
+#endif /* OSX Version >= 10.8 */
 
 static void
 fill_button_event (GdkWindow *window,
@@ -1647,11 +1647,12 @@ gdk_event_translate (GdkEvent *event,
           }
       }
       break;
-#ifdef AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER
+#ifdef AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER
     case NSEventTypeMagnify:
     case NSEventTypeRotate:
       /* Event handling requires [NSEvent phase] which was introduced in 10.7 */
-      if (gdk_quartz_osx_version () >= GDK_OSX_LION)
+      /* However - Tests on 10.7 showed that phase property does not work     */
+      if (gdk_quartz_osx_version () >= GDK_OSX_MOUNTAIN_LION)
         fill_pinch_event (window, event, nsevent, x, y, x_root, y_root);
       else
         return_val = FALSE;